package edu.hunau.cxb19.basic.class04;

/**
 *
 * @author hb
 *
 *         2020-02-12 16:00:15
 */
public class IfDemo {

	public static void main(String[] args) {

		int a = 2;
		switch (a) {
		case 1:
			System.out.println(1);
		case 2:
			System.out.println(2);
		case 3:
			System.out.println(3);
		case 4:
			System.out.println(4);
			break;
		default:
			System.out.println(99);

		}

	}

	public static void weekDay(int a) {
		switch (a) {
		case 1:
			System.out.println("周一");
			break;
		case 2:
			System.out.println("周2");
			break;
		case 3:
			System.out.println("周3");
			break;
		case 4:
			System.out.println("周4");
			break;
		case 5:
			System.out.println("周5");
			break;
		case 6:
			System.out.println("周6");
			break;
		case 7:
			System.out.println("周7");
			break;
		default:
			System.out.println("输入数字有误");
			break;

		}
	}

	/**
	 * 判断一个整数是否为偶数
	 * 
	 * @param a
	 * @return
	 */
	public static boolean isEven(int a) {

		if (a % 2 == 0) {
			return true;
		} else {
			return false;
		}
	}
}
